﻿using System;
using MMD4MecanimInternal.Bullet;
using UnityEngine;

// Token: 0x020000A5 RID: 165
public class MMD4MecanimRigidBody : MonoBehaviour
{
	// Token: 0x060003DD RID: 989 RVA: 0x0001DA40 File Offset: 0x0001BC40
	private void Start()
	{
		MMD4MecanimBulletPhysics instance = MMD4MecanimBulletPhysics.instance;
		if (instance != null)
		{
			this._bulletPhysicsRigidBody = instance.CreateRigidBody(this);
		}
	}

	// Token: 0x060003DE RID: 990 RVA: 0x0001DA6C File Offset: 0x0001BC6C
	private void OnDestroy()
	{
		if (this._bulletPhysicsRigidBody != null && !this._bulletPhysicsRigidBody.isExpired)
		{
			MMD4MecanimBulletPhysics instance = MMD4MecanimBulletPhysics.instance;
			if (instance != null)
			{
				instance.DestroyRigidBody(this._bulletPhysicsRigidBody);
			}
		}
		this._bulletPhysicsRigidBody = null;
	}

	// Token: 0x04000547 RID: 1351
	public RigidBodyProperty bulletPhysicsRigidBodyProperty;

	// Token: 0x04000548 RID: 1352
	private MMD4MecanimBulletPhysics.RigidBody _bulletPhysicsRigidBody;
}
